const express = require('express');
const router = express.Router();
const bookshelfController = require('../controllers/bookshelfController');
const { authenticateToken } = require('../middleware/auth');
const { validateBookId, validateBorrowDays } = require('../middleware/validation');

router.use(authenticateToken);
router.get('/', bookshelfController.getList);
router.post('/', bookshelfController.add);
router.delete('/:bookId', validateBookId, bookshelfController.remove);

module.exports = router;